<?php
interface IString extends IObject {
	public function __construct($string = '');
	public static function create ($string = '');
	public function __toString ();
	public function get ();
	public function set ($string);
	public function equals ($string);

	// Core
	public function length ();
	public function size ();
	public function add ($string);
	public function insert ($string, $pos = 0);
	public function url ($mode);

	// "Str" library by Koc
	public function take ($what, $type = Str::RIGHT, $caseSensitive = Str::CS);
	public function find ($what, $type = Str::BOOL, $caseSensitive = Str::CS, $from = 0);
	public function changeCase ($what = Str::ALL, $mode = Str::UP);
	public function base64 ($action = Str::ENCODE, $urlSafe = false);
	public function trim ($charlist = NULL, $mode = Str::BOTH);
	public function reverse ($from = NULL, $length = NULL);
	public function filter ($mode);
	public function fill ($length, $fillWith = ' ', $type = Str::RIGHT);
	public function format ();

	// Different
	public function cut ($from, $length = null);
	public function beginsWith ($str, $caseInsensitive = false);
	public function endsWith ($str, $caseInsensitive = false);
	public function split ($by = 1, $limit = null);
	public function count ($str = null);
	public function replace ($what, $with);
	public function in ();
	public function repeat ($multiplier);
	public function hash ($algo = 'md5', $rowOutput = false);

	// PCRE
	public function pregQuote ($delimiter = NULL);
	public function pregFilter ($pattern, $replacement, $limit = -1, &$count = null);
	public function pregSplit ($pattern, $limit = -1, $flags = 0);
	public function pregMatchAll ($pattern, &$count = null, $flags = 0, $offset = 0);
	public function pregTest ($pattern, $flags = 0, $offset = 0);
	public function pregMatch ($pattern, &$count = null, $flags = 0, $offset = 0);
	public function pregReplace ($pattern, $replacement, $limit = -1, &$count = null);
	public function pregReplaceCallback ($pattern, $replacement, $limit = -1, &$count = null);
}